package UIFree.effects.flames
{
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;

	public class ef_flame extends uif_ecomponent {
		public static const RECTFLAME: int = 1;
		public static const CYRCLEFLAME: int = 2;
		private var _type: int;
		
		public function ef_flame(parent:uif_component, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0, atype: int=RECTFLAME, styleClass:String='') {
			_type = atype;
			super(parent, ax, ay, awidth, aheight, styleClass);
		}
		
		public function get type(): int {
			return _type;
		}
		
		override protected function paint(a_styleClass:String, a_method:String='draw_rect'):void {
			if (_type == RECTFLAME) this.draw_rect(-width / 2, -height / 2, width, height, style);
			else if (_type == CYRCLEFLAME) this.draw_circle(0, 0, width, style);
		}
	}
}